package com.example.sofa_module.sofa.fragments.video;

import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.alibaba.android.arouter.launcher.ARouter;
import com.bw.ijk.widget.IjkView;
import com.example.baserecyclerview.quick.BaseQuickAdapter;
import com.example.baserecyclerview.quick.BaseViewHolder;
import com.example.sofa_module.R;
import com.example.sofa_module.sofa.entity.BeanEntity;

;

public class VideoAdapter extends BaseQuickAdapter<BeanEntity, BaseViewHolder> {


    public VideoAdapter() {
        super(R.layout.item_sofa_video);
    }

    @Override
    public void convert(BaseViewHolder holder, BeanEntity item) {
                //视频
                holder.setText(R.id.item_video_artist, item.author.name);
                holder.setText(R.id.item_video_feeds_content, item.feeds_text);
                holder.setText(R.id.item_video_type, item.activityText);
                IjkView ijkView = holder.getView(R.id.item_video_IjkView);
                ijkView.setPlayUrl(item.url);
                ijkView.setImgUrl(item.cover);
                ijkView.start();
                holder.setText(R.id.item_video_comment_count,""+item.ugc.commentCount);
                holder.setText(R.id.item_video_share_count,""+item.ugc.shareCount);
                holder.setImageyun(R.id.item_video_pic,item.author.avatar);
    }
}
